<?php //dump($this->uri->segments[4]); ?>
<script language="javascript">
	// 导航
	$(document).ready(function () {
		var nav_obj = $("#menu_<?php echo @isset($this->uri->segments[2]) ? @$this->uri->segments[2] : 'Zhengnenglang' ?>");
		if( nav_obj.size() > 0 ) {
			nav_obj.addClass("navon");
			$('#product-nav-title').html(nav_obj.text());
			$('#nav_title').html(nav_obj.text());
			console.log(nav_obj);
		}
		var nav_obj = $("#menu_2_<?php echo @isset($this->uri->segments[2]) ? @$this->uri->segments[2] : 'Zhengnenglang' ?>");
		if( nav_obj.size() > 0 ) {
			nav_obj.show();
		}
		var nav_obj = $("#menu_2_<?php
		if (@$this->uri->segments[2] == 'lore'){
		    if (@$this->uri->segments[3] == 'content') {
                echo 'lore_subject'.$lore['id'];
            } else {
                echo 'lore_subject'.$this->uri->segments[4];
            }
		}elseif (@$this->uri->segments[2] == 'statistics'){
			if(@$this->uri->segments[3] == 'month_records'){
				echo 'statistics_ls'.$this->uri->segments[3];
			}else{
				echo 'statistics_ls'.$this->uri->segments[4];
			}
		}else{
			echo isset($this->uri->segments[2]) ? $this->uri->segments[2] : '';
			echo '_';
			$menu_2_id = isset($this->uri->segments[3]) ? $this->uri->segments[3] : 'index';
			$menu_2_arr = explode('_', $menu_2_id);
			echo count($menu_2_arr) > 1 ? $menu_2_arr[0] : $menu_2_id;
		}

		?>");
		if( nav_obj.size() > 0 ) {
			console.log(nav_obj);
			nav_obj.addClass("active");0
		}
	});
	$(document).ready(function () {
		$(".sidebar-trans>span.nav-title").hide();
		$(".sidebar-trans").hover(function(){
			$(".sidebar").css("z-index","102");
			$(this).children(".nav-title").show();
		},function(){
			$(this).children(".nav-title").hide();
			$(".sidebar").css("z-index","100");
		});
	});
</script>
<div class="sidebar">
	<div class="sidebar-content">
		<div class="sidebar-nav main-nav" >
			<ul class="entrance-nav">
                <li class="nav-item active" id="menu_home">
                    <a href="<?php echo site_url('admin/home') ?>" class="sidebar-trans">
                        <div class="nav-icon sidebar-trans">
                            <i class="icon-home"></i>
                        </div>
                        <span class="nav-title">首页</span>
                    </a>
                </li>
                <li class="nav-item" id="menu_hui">
                    <a href="<?php echo site_url('admin/hui/index') ?>" class="sidebar-trans">
                        <div class="nav-icon sidebar-trans">
                            <i class="icon-tasks"></i>
                        </div>
                        <span class="nav-title">活动信息</span>
                    </a>
                </li>
                <li class="nav-item" id="menu_b">
                    <a href="<?php echo site_url('admin/b/ls') ?>" class="sidebar-trans">
                        <div class="nav-icon sidebar-trans">
                            <i class="icon-group"></i>
                        </div>
                        <span class="nav-title">商户</span>
                    </a>
                </li>
                    <?php
                    if( $this->login_user['id'] == 1 ) {
                    ?>
                    <li class="nav-item" id="menu_user">
                            <a href="<?php echo site_url('admin/user/ls') ?>" class="sidebar-trans">
                                <div class="nav-icon sidebar-trans">
                                    <i class="icon-user"></i>
                                </div>
                                <span class="nav-title">用户</span>
                            </a>
                        </li>
                    <?php }?>
			</ul>
		</div>
	</div>
</div>